 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/inc/taglib.inc"%>
<%@ include file="/WEB-INF/inc/script.inc"%>


<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="${base}">
<title>中金通 | 录入项目</title>

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.css" rel="stylesheet">

<!-- FooTable -->
<!-- <link href="css/plugins/footable/footable.core.css" rel="stylesheet"> -->
<!-- summernote -->
<link href="css/plugins/summernote/summernote.css" rel="stylesheet">
<link href="css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
<link href="css/plugins/zyupload/skins/zyupload-1.0.0.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="js/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet">
   <style>
   		.upload_btn{
   			display:none;
   		}
  		.note-editor{
			min-height:0px;
			border: 1px solid #e5e6e7;
		}
		.content-control {
			display: block;
			width: 100%;
			/* padding:6px 12px; */
			line-height: 1.42857143;
			color: #555;
			background-color: #fff;
			background-image: none;
			border: 1px solid #ccc;
			/* border-radius: 4px; */
			-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
			box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
			-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
			-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
			transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
		}
		.content-control.error{
		 	border: 1px dotted #cc5965;
		}
		.content-control.has-success{
			border-color: #1ab394;
			-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
			box-shadow: inset 0 1px 1px rgba(0,0,0,.075)
		}
		.control-label.content-success{
			color:#1ab394;
		}
    </style>
    <script type="text/javascript">
	/*  window.onbeforeunload() { 
        //用户点击浏览器右上角关闭按钮
        if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) { 
		}//用户点击任务栏，右键关闭
        else if(event.clientY > document.body.clientHeight || event.altKey){
        }
        else//其他情况为刷新 
        { 
        alert("你在刷新");
        } 
        };  */
	</script>
</head>

<body >

	<div id="wrapper">

		<!-- 左侧菜单 -->
		<jsp:include page="/WEB-INF/jsp/common/main-menu.jsp"></jsp:include>
		<div id="page-wrapper" class="gray-bg">
			<div class="row border-bottom">
				<!-- 头部工具栏区 -->
				<jsp:include page="/WEB-INF/jsp/common/main-header.jsp"></jsp:include>
			</div>
			<div class="row wrapper border-bottom white-bg page-heading">
				<div class="col-lg-10">
					<h2>基金经理</h2>
					<ol class="breadcrumb">
						<li><a href="common/platform">Home</a></li>
						<li><a href="project/nonInStoreList">项目管理</a></li>
						<li class="active"><strong>录入项目</strong></li>
					</ol>
				</div>
				<div class="col-lg-2"></div>
			</div>
			<div class="row" style="margin-top: 10px;">
				<div class="col-md-12">
					<div class="tabs-container">
					<ul class="nav nav-tabs">
			            <li class="active">
							<a href="#">
								录入项目
							</a>
						</li>
			        </ul> 
						<div class="tab-content">
							<div class="tab-pane active">
								<div class="panel-body">
									<div class="wrapper wrapper-content animated">
									<div class="row">
                                        <div class="col-lg-12">
                   							 <div class="ibox">
                   							 <div>
									<form action="" method="post" id="addForm"
												enctype="multipart/form-data"  
												class="form-horizontal">
			                           <div class="row">
						                    <div class="col-sm-6">
						                       <div class="form-group">
						                           <label class="col-sm-4 control-label"><font color="red">*&nbsp;&nbsp;</font>项目名称:</label>
			                                       <div class="col-sm-8">
			                                    	   <input type="text" name="name" class="form-control" placeholder="项目名称" value="${project.name}">
			                                       </div>
						                       </div>
						                    </div>
						                    <div class="col-sm-6">
						                        <div class="form-group">
						                        	<label class="col-sm-2 control-label" style="position:relative;margin-left:-18px;width:19%;"><font color="red">*&nbsp;&nbsp;</font>项目编号:</label>
			                                        <div class="col-sm-8">
			                                    	   <input type="text" name="code" class="form-control" placeholder="项目编号" value="${project.code}">
			                                        </div>
						                        </div>
						                    </div>
						                 </div>
			                             <div class="row">
						                    <div class="col-sm-6">
						                        <div class="form-group">
						                            <label class="col-sm-4 control-label"><font color="red">*&nbsp;&nbsp;</font>项目类型:</label>
			                                        <div class="col-sm-8">
			                                    	   <select id="type" class="form-control m-b" name="type" >
							                              <option value="1">债券类</option>
							                              <option value="2">股权类</option>
							                           </select>
			                                        </div>
						                        </div>
						                    </div>
						                    <div class="col-sm-6">
						                        <div class="form-group">
						                            <label class="col-sm-2 control-label"><font color="red">*&nbsp;&nbsp;</font>企业:</label>
			                                        <div class="col-sm-8">
			                                        	<div class="input-group">
			                                    	   <select id="enterpriseId" class="form-control m-b" name="enterpriseId" >
							                              <c:if test="${enterpriseList.size() != 0}">
             													<c:forEach var="i" begin="0" end="${enterpriseList.size()-1}">
												                	<option value="${enterpriseList.get(i).getId()}" >${enterpriseList.get(i).getName()}</option>
											                </c:forEach>
										             		</c:if>
							                           </select>
							                           <span class="input-group-btn"> <button type="button" name="addEnterprise" class="btn btn-primary">新增
                                        					</button> </span></div>
			                                        </div>
						                        </div>
						                    </div>
						                 </div>
			                              <div class="row" id="guaranteeTypeDiv">
						                    <div class="col-sm-6">
						                        <div class="form-group">
						                            <label class="col-sm-4 control-label"><font color="red">*&nbsp;&nbsp;</font>担保方式:</label>
			                                        <div class="col-sm-8">
			                                    	   <select id="guaranteeType" class="form-control m-b" id="guaranteeType" name="guaranteeType" >
							                              <option value="1">保证</option>
							                              <option value="2" selected="selected">抵押</option>
							                              <option value="3">质押</option>
							                              <option value="4">留质</option>
							                              <option value="5">定金</option>
							                           </select>
			                                        </div>						                        
		                                        </div>
						                    </div>
						                    <div class="col-sm-6">
						                        <div class="form-group">
						                        	<label class="col-sm-2 control-label" id="guaranteeLabel"><font color="red">*&nbsp;&nbsp;</font>抵押人:</label>
			                                        <div class="col-sm-8">
			                                        	<div class="input-group">
			                                    	   <select id="guaranteeEnterpriseId" class="form-control m-b" name="guaranteeEnterpriseId" >
							                              <c:if test="${enterpriseList.size() != 0}">
             													<c:forEach var="i" begin="0" end="${enterpriseList.size()-1}">
												                	<option value="${enterpriseList.get(i).getId()}" >${enterpriseList.get(i).getName()}</option>
											                </c:forEach>
										             		</c:if>
							                           </select>
							                           <span class="input-group-btn"> <button type="button" name="addEnterprise" class="btn btn-primary">新增
                                        					</button> </span></div>
			                                        </div>
						                        </div>
						                    </div>
						                 </div>
			                             <!-- <div class="hr-line-dashed"></div> -->
			                             <div class="row" id="guaranteeAssessDiv">
						                    <div class="col-sm-12">
												<div class="form-group">
													<label class="col-sm-2 control-label" id="guaranteeAssessLabel"><font
														color="red">*&nbsp;&nbsp;</font>抵押物状况/评估:</label>
													<div class="col-sm-8">
														<textarea id="guaranteeAssess" name="guaranteeAssess" class="form-control"
															placeholder="抵押物状况/评估(1-1000字)" rows="10"></textarea>
													</div>
												</div>
			                                </div>
						                 </div>
			                             <!-- <div class="hr-line-dashed"></div> -->
			                              <div class="row">
			                              	<div class="col-sm-6">
						                        <div class="form-group">
						                        	<label class="col-sm-4 control-label"><font color="red">*&nbsp;&nbsp;</font>项目金额:</label>
			                                       <div class="col-sm-8">
			                                    	   <input type="text" name="amount" class="form-control" placeholder="项目金额" value="${project.amount}">
			                                       </div>
						                        </div>
						                    </div>
						                    <div class="col-sm-6">
						                        <div class="form-group">
						                            <label class="col-sm-2 control-label"><font color="red">*&nbsp;&nbsp;</font>风控经理:</label>
			                                        <div class="col-sm-8">
			                                    	   <select id="incomeType" class="form-control m-b" name="lawEmployeeId" >
							                              <c:if test="${approveRoleGroupMemberList.size() != 0}">
             													<c:forEach var="i" begin="0" end="${approveRoleGroupMemberList.size()-1}">
             													<option value="${approveRoleGroupMemberList.get(i).getEmployeeId()}">${approveRoleGroupMemberList.get(i).getEmpName()}</option>
											                	</c:forEach>
										             		</c:if>
							                           </select>
			                                        </div>
						                        </div>
						                    </div>
						                 </div> 
			                            <div class="row">
			                            	<div class="col-sm-12">
												<div class="form-group">
													<label class="col-sm-2 control-label" id="content-label"><font
														color="red">*&nbsp;&nbsp;</font>项目简介:</label>
													<div class="col-sm-8">
					                                    <div class="ibox-content no-padding">
						                                    <div class="summernote" id="introduction" class="form-control">
						                                    </div>
					                                   		<label id="contents-error" class="error" style="display:none" for="content">内容不能为空</label>
					                                    </div>
				                                	</div>
												</div>
			                                </div>
			                            </div>
			                            <div class="row"> 
			                            	<div class="col-sm-12">
												<div class="form-group">
													<label class="col-sm-2 control-label" id="content-label1"><font
														color="red">*&nbsp;&nbsp;</font>融资方案:</label>
													<div class="col-sm-8">
					                                    <div class="ibox-content no-padding">
						                                    <div class="summernote" id="plan" class="form-control">
						                                    </div>
					                                   		<label id="contents-error1" class="error" style="display:none" for="content">内容不能为空</label>
					                                    </div>
				                                	</div>
												</div>
			                                </div>
			                            </div>
			                             <div class="row"> 
			                            <div class="col-sm-6">
						                       <div class="form-group">
						                           <label class="col-sm-4 control-label">项目附件:</label>
			                                       <div class="col-sm-8">
			                                    	   <div id="zyupload" class="zyupload"></div>  
			                                       </div>
						                       </div>
						                    </div>
						                    </div>
										<div class="hr-line-dashed"></div>
		                              	<div class="form-group">
		                                  <div class="col-sm-4 col-sm-offset-5">
		                                      <button class="btn btn-white" type="reset" id="cancleAbout">取 消</button>
		                                      <button class="btn btn-primary" id="submit_manager" type="submit">保 存</button>
		                                  </div>
		                              	</div>
									</form>
									</div>
									</div>
								</div>
							</div>
						</div>
						</div>
						</div>
						</div>
					</div>
				</div>
			</div>
			<!-- 底部版权 -->
			<jsp:include page="/WEB-INF/jsp/common/main-footer.jsp"></jsp:include>
		</div>
	</div>
	<!-- Mainly scripts -->
	<script src="js/jquery-2.1.1.js"></script>
	<script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
	<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
	<script src="js/plugins/jeditable/jquery.jeditable.js"></script>
	<script src="js/jquery.serialize-object.min.js" type="text/javascript"></script>
	<script src="js/plugins/validate/jquery.validate.min.js" type="text/javascript"></script>
	<script src="js/plugins/validate/jquery.validate.messages-zh_CN.js" type="text/javascript"></script>

	<!-- Custom and plugin javascript -->
	<script src="js/inspinia.js"></script>
	<script src="js/plugins/pace/pace.min.js"></script>
	<script src="js/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
	<!-- Data picker -->
	<script src="js/laydate-master/laydate.js"></script>
	<!-- Clock picker -->
	<script src="js/jquery.tmpl.min.js"></script>
	<script src="js/ajaxfileupload.js"></script>
	<script src="js/jquery.form.js"></script>
	
    
 	<script src="js/project/project-add.js?v=${jsVersion}"></script>
 	<!-- SUMMERNOTE -->
    <script src="js/plugins/summernote/summernote.min.js"></script>
    <!-- zyupload -->
    <script src="js/plugins/zyupload/zyupload.basic-1.0.0.js"></script>
	<script>
		$(document).ready(function() {
			ProjectAdd.init();
		});
		var DispClose = true;
        function CloseEvent()
        {
	        var content = $('.summernote').code();
	        if (((content.trim() != '' && content.trim() != "<p><br></p>")) && DispClose )
        {
        	return "是否要刷新或离开？\n确定放弃修改直接退出？";
        }
        }
        
        function UnLoadEvent()
        {
        DispClose = false;
        //在这里处理关闭页面前的动作
        }
	</script>

</body>

</html>
